﻿using Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace Core.Factory
{
    public interface IActivityService : IDependency
    {
        /// <summary>
        /// 参加活动
        /// </summary>
        /// <param name="join"></param>
        /// <param name="formId"></param>
        /// <returns></returns>
        T_Activity JoinActivity(T_Join join, string formId);
        /// <summary>
        /// 新建活动
        /// </summary>
        /// <param name="activity"></param>
        /// <param name="details"></param>
        /// <param name="graphics"></param>
        /// <param name="formId"></param>
        /// <returns></returns>
        T_Activity Add(T_Activity activity, List<T_ActivityDetail> details, List<T_Graphic> graphics, string formId);
        /// <summary>
        /// 更改活动首页
        /// </summary>
        /// <param name="id"></param>
        /// <param name="url"></param>
        /// <returns></returns>
        T_ActivityDetail Update(int id, string url);
        /// <summary>
        /// 更改图文详情图片地址
        /// </summary>
        /// <param name="id"></param>
        /// <param name="url"></param>
        /// <returns></returns>
        T_Graphic UpdateGraphic(int id, string url);
        /// <summary>
        /// 获取formid
        /// </summary>
        /// <returns></returns>
        string GetFormId(int userId,string flag);
        /// <summary>
        /// 设置状态
        /// </summary>
        /// <param name="formId"></param>
        /// <returns></returns>
        string SetFormId(string formId);
        /// <summary>
        /// 更改formid状态
        /// </summary>
        /// <param name="formId"></param>
        void UpdateForm(string formId);
        /// <summary>
        /// 更改开奖状态
        /// </summary>
        /// <param name="activityId"></param>
        void UpdateOpen(int activityId, int isOpen);
        /// <summary>
        /// 更改首页过期时间
        /// </summary>
        /// <param name="activityId"></param>
        void SetHome(int userId, int activityId);

    }
}
